package com.university.vo;

import java.sql.Timestamp;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * Companycomment entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "companycomment", catalog = "university")

public class Companycomment implements java.io.Serializable {

	// Fields

	private Integer companyCommentId;
	private Student student;
	private Parttime parttime;
	private String companyCommentText;
	private Timestamp companyCommentTime;
	private Integer companyCommentGrade;
	private Boolean compangCommentEnable;

	// Constructors

	/** default constructor */
	public Companycomment() {
	}

	@Override
	public String toString() {
		return "Companycomment [companyCommentId=" + companyCommentId + ", student=" + student + ", parttime="
				+ parttime + ", companyCommentText=" + companyCommentText + ", companyCommentTime=" + companyCommentTime
				+ ", companyCommentGrade=" + companyCommentGrade + ", compangCommentEnable=" + compangCommentEnable
				+ "]";
	}

	/** full constructor */
	public Companycomment(Student student, Parttime parttime, String companyCommentText, Timestamp companyCommentTime,
			Integer companyCommentGrade, Boolean compangCommentEnable) {
		this.student = student;
		this.parttime = parttime;
		this.companyCommentText = companyCommentText;
		this.companyCommentTime = companyCommentTime;
		this.companyCommentGrade = companyCommentGrade;
		this.compangCommentEnable = compangCommentEnable;
	}

	// Property accessors
	@Id
	@GeneratedValue

	@Column(name = "companyComment_id", unique = true, nullable = false)

	public Integer getCompanyCommentId() {
		return this.companyCommentId;
	}

	public void setCompanyCommentId(Integer companyCommentId) {
		this.companyCommentId = companyCommentId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "companyComment_studentId")

	public Student getStudent() {
		return this.student;
	}

	public void setStudent(Student student) {
		this.student = student;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "companyComment_partTimeId")

	public Parttime getParttime() {
		return this.parttime;
	}

	public void setParttime(Parttime parttime) {
		this.parttime = parttime;
	}

	@Column(name = "companyComment_text", length = 2000)

	public String getCompanyCommentText() {
		return this.companyCommentText;
	}

	public void setCompanyCommentText(String companyCommentText) {
		this.companyCommentText = companyCommentText;
	}

	@Column(name = "companyComment_time", length = 19)

	public Timestamp getCompanyCommentTime() {
		return this.companyCommentTime;
	}

	public void setCompanyCommentTime(Timestamp companyCommentTime) {
		this.companyCommentTime = companyCommentTime;
	}

	@Column(name = "companyComment_grade")

	public Integer getCompanyCommentGrade() {
		return this.companyCommentGrade;
	}

	public void setCompanyCommentGrade(Integer companyCommentGrade) {
		this.companyCommentGrade = companyCommentGrade;
	}

	@Column(name = "compangComment_enable", insertable = false)

	public Boolean getCompangCommentEnable() {
		return this.compangCommentEnable;
	}

	public void setCompangCommentEnable(Boolean compangCommentEnable) {
		this.compangCommentEnable = compangCommentEnable;
	}

}